public class Text {
    public static void main(String[] args) {
        MyLinklist list = new MyLinklist();
        list.addLast(1);
        list.addLast(2);
        list.addLast(3);
        list.addLast(4);
        list.addLast(5);
        list.display();
        System.out.println();
        int A = list.backwards(5);
        int B = list.backwards(2);
        System.out.println(A);
        System.out.println(B);
    }
}
